<template>
  <div class="hello">
    <h2 @click="ok()">{{city}}</h2>
    
    <div  v-show="show" class="city">
      <div @click="save()" style="color:red">✔️</div>
       <v-distpicker type="mobile" hide-area wrapper @selected="onSelected"></v-distpicker>       
    </div>

  </div>
</template>

<script>
export default {
  name: 'HelloWorld',
  data () {
    return {
      show: false,
      city:"fasf"
    }
  },
  methods:{
   ok(){
      this.show=true
   },
   save(){
      this.show=false;
   },
    onSelected(data) {
      console.log(data)
      this.city=data.city.value;
      if(this.city=="市辖区"){
        console.log(1)
        this.city=data.province.value;
      }
    },
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}

ul {
  list-style-type: none;
  padding: 0;
}

li {
  display: inline-block;
  margin: 0 10px;
}

a {
  color: #42b983;
}

.city{
  border:1px solid red;
  height: 160px;
  overflow: scroll;
  position: fixed;
  bottom: 0px;
  left: 0px;
  width: 100vw;
}
</style>
